const express = require('express');
const router = express.Router();
const Product = require('../../service/manage/product');
const User = require('../../service/manage/user');

//产品
router.route('/product').post(Product.add);
router.route('/product/list').get(Product.list);
router.route('/product/:id').delete(Product.remove).get(Product.detail);
router.route('/product').put(Product.edit);

//登录
router.route('/login').post(User.login);
router.route('/register').post(User.register);
router.route('/getInfo/:id').get(User.getInfo);


module.exports = router;